import request from '@/utils/request'

// 分页查询
export function getActivityPage(data) {
  return request({
    url: '/admin/activity/page',
    method: 'put',
    data
  })
}

// 新增
export function addActivity(data) {
  return request({
    url: '/admin/activity/add',
    method: 'POST',
    data
  })
}

// 修改
export function updateActivity(data) {
  return request({
    url: '/admin/activity/update',
    method: 'PUT',
    data
  })
}

// 删除
export function deleteActivity(id) {
  return request({
    url: `/admin/activity/remove/${id}`,
    method: 'delete'
  })
}

//禁用
export function activeActivity(activityId, status) {
  return request({
    url: `/admin/activity/active/${activityId}/${status}`,
    method: "post",
  });
}